<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var Fruits = prompt('请输入水果名称');
        switch (Fruits) {
            case '苹果': alert('3.5/斤')
                break;
            case '芒果': alert('6.5/斤')
                break;
            case '香蕉': alert('2.5/斤')
                break;
            case '橘子': alert('1.5/斤')
                break;
            default: alert('没有这个水果')
        }
    </script>
</head>

<body>

</body>

</html>